package com.llt.music.service;

import com.llt.music.mapper.MusicMapper;
import com.llt.music.model.Music;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class MusicService {

    @Resource
    private MusicMapper musicMapper;

    public int add(String title, String singer, String time, String url, int userId){
        return musicMapper.add(title, singer, time, url, userId);
    }

    public Music query(String title, String singer) {
        return musicMapper.query(title, singer);
    }

    public Music queryById(int id) {
        return musicMapper.queryById(id);
    }

    public int deleteByid(int id) {
        return musicMapper.deleteMusicById(id);
    }
}
